<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <title>FlyShop开源商城系统 - FlyShop开源电子商务平台</title>
    <meta name='keywords' content='开源商城系统,开源网店系统,开源电子商务,商城系统源码,多用户商城源码'>
    <meta name='description' content='FlyShop是基于Java开发b2c2c开源多用户商城系统,支持商家入驻,支持微商城,手机移动商城,APP商城多为一体的电子商务系统'>
    <link rel="stylesheet" href="/assets/admin-lte/css/admin.css" />
    <link rel="stylesheet" href="/assets/js/vendors/bootstrap-switch/css/bootstrap-switch.min.css" />
    <link rel="stylesheet" type="text/css" href="/assets/js/vendors/artdialog/skins/aero.css" />
    <link rel="stylesheet" type="text/css" href="/assets/js/vendors/autovalidate/style.css" />
    <!--[if lt IE 9]>
    <script src="/assets/js/html5shiv.min.js"></script>
    <script src="/assets/js/respond.min.js"></script>
    <![endif]-->
    <meta name="robots" content="noindex,nofollow">
    <link rel="shortcut icon" href="/assets/favicon.ico" />
    <script type="text/javascript" charset="UTF-8" src="/assets/js/vendors/jquery/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" charset="UTF-8" src="/assets/js/vendors/artdialog/artDialog.js"></script>
    <script type="text/javascript" charset="UTF-8" src="/assets/js/vendors/artdialog/plugins/iframeTools.js"></script>
    <script type="text/javascript" charset="UTF-8" src="/assets/js/vendors/autovalidate/validate.js"></script>
    <script type="text/javascript" charset="UTF-8" src="/assets/js/vendors/artTemplate/artTemplate.js"></script>
    <script type="text/javascript" charset="UTF-8" src="/assets/js/vendors/artTemplate/artTemplate-plugin.js"></script>
    <script type='text/javascript' src="/assets/js/vendors/bootstrap/js/bootstrap.min.js"></script>
    <script type='text/javascript' src="/assets/admin-lte/js/adminlte.min.js"></script>
    <script type="text/javascript" src="/assets/js/sea.js"></script>
    <script type="text/javascript" src="/assets/js/sea.config.js"></script>
</head>
<body class="skin-blue fixed sidebar-mini" style="height: auto; min-height: 100%;">
<div class="wrapper" style="height: auto; min-height: 100%;">
    <#assign page_tab="index">
    <#include "../common/header.html">

    <#include "../common/system_menu.html">

    <!--右侧内容 开始-->
    <div id="admin_right" class="content-wrapper">
        <div class="breadcrumbs" id="breadcrumbs">
            <ul class="breadcrumb">
                <li>
                    <i class="home-icon fa fa-home"></i>
                    <a href="#">系统</a>
                </li>
                <li>
                    <a href="#">权限管理</a>
                </li>
                <li class="active">分配权限</li>
            </ul>
        </div>
        <div class="content" style="min-height: 0px">
            <div class="timeline-item">
                <h4 class="box-header with-border">正在为 <span class="text-red">${role.name!}</span>分配权限,	点亮左侧开关分配权限给当前角色</h4>
            </div>
        </div>
        <div class="content">
            <div class="row">
                <#list permissionMap?keys as mapItem>
                <div class="col-md-6">
                    <!-- DIRECT CHAT -->
                    <div class="box box-warning direct-chat direct-chat-warning">
                        <div class="box-header with-border">
                            <h3 class="box-title">控制器：${mapItem!}</h3>

                            <div class="box-tools pull-right">

                                <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
                                </button>
                                <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i>
                                </button>
                            </div>
                        </div>
                        <!-- /.box-header -->
                        <div class="box-body">
                            <div class="table-responsive">
                                <table class="table no-margin">
                                    <thead>
                                    <tr>
                                        <th width="33%">开关</th>
                                        <th width="33%">URL</th>
                                        <th width="33%">权限说明</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <#list permissionMap[mapItem] as list>
                                    <tr>
                                        <td><input data-role-id="${role.id!}" data-permission-id="${list.id}" type="checkbox"<@fly_mark_role_tag roleId="${role.id!}" permissionId="${list.id!}"><#if mark> checked</#if></@fly_mark_role_tag> class="js-switch bootstrap-switch-mini"></td>
                                        <td>${list.actionKey!}</td>
                                        <td>
                                            ${list.remark!}
                                        </td>
                                    </tr>
                                    </#list>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                    <!--/.direct-chat -->
                </div>
                <!-- /.col -->
               </#list>

            </div>
        </div>

    </div>
    <!--右侧内容 结束-->

    <!--顶部弹出菜单 开始-->
    <aside class="control-sidebar control-sidebar-dark">
        <ul class="control-sidebar-menu">
            <li><a href="/admin/logout"><i class="fa fa-circle-o text-red"></i> 退出管理</a></li>
            <li><a href="/system/admin_repwd"><i class="fa fa-circle-o text-yellow"></i> 修改密码</a></li>
            <li><a href="/system/default"><i class="fa fa-circle-o text-green"></i> 后台首页</a></li>
            <li><a href="/" target='_blank'><i class="fa fa-circle-o text-aqua"></i> 商城首页</a></li>
            <li><a href="/system/navigation"><i class="fa fa-circle-o"></i> 快速导航</a></li>
        </ul>
    </aside>
    <!--顶部弹出菜单 结束-->
</div>

<script type="text/javascript">seajs.use('permission', function(permission) {});</script>
</body>
</html>